package com.spzx.product.domain;

import com.spzx.common.core.web.domain.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import jakarta.validation.constraints.NotBlank;
import jakarta.validation.constraints.Size;
import lombok.Data;

/**
 * 商品分类表 category
 *
 * @author gaozz
 */
@Data
@Schema(description = "商品分类")
public class Category extends BaseEntity {

    private static final long serialVersionUID = 1L;

    /**
     * 分类名称
     */
    @Schema(description = "分类名称")
    @NotBlank(message = "分类名称不能为空")
    @Size(min = 0, max = 50, message = "分类名称的长度不能超过64个字符")
    private String name;

    /**
     * 商品分类图标
     */
    @Schema(description = "商品分类图标")
    @NotBlank(message = "商品分类图标不能为空")
    @Size(min = 0, max = 200, message = "商品分类图标的长度不能超过200个字符")
    private String imageUrl;

    /**
     * 父分类id
     */
    @Schema(description = "父分类id")
    @NotBlank(message = "父分类id不能为空")
    private Long parentId;

    /**
     * 是否显示[0-不显示，1显示]
     */
    @Schema(description = "是否显示")
    private Integer status;

    /**
     * 排序
     */
    @Schema(description = "排序")
    private Integer orderNum;
}
